home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15131 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: undergrad.math.uwaterloo.ca!sckettle
  3. From: sckettle@undergrad.math.uwaterloo.ca (Steve Kettle)
  4. Subject: Re: Fastest Sorting Algorithm?
  5. Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
  6. Message-ID: <DpAxtI.3w9@undergrad.math.uwaterloo.ca>
  7. Date: Wed, 3 Apr 1996 19:51:18 GMT
  8. References: <Dou55w.7MB@novice.uwaterloo.ca>
  9. Nntp-Posting-Host: noether.math.uwaterloo.ca
  10. Organization: University of Waterloo
  11.  
  12. In article <Dou55w.7MB@novice.uwaterloo.ca>,
  13. Gerald Wang  <GTWANG@HELIX.Watstar.UWaterloo.CA> wrote:
  14. >A classmate was recently asked during a job interview what is the fastest 
  15. >method to sort an array of numbers. He replied "Use a quicksort." They 
  16. >asked "And how would you make it faster still?" He couldn't come up with 
  17. >much...end of interview.
  18. >
  19. >I know it's a vague question... Any ideas on what they were asking? Or 
  20. >what the right answer is?
  21. >
  22. >Gerald
  23. >
  24. >-------------------------------------------------------------------------
  25. >Gerald Wang
  26. >http://www.csclub.uwaterloo.ca/~gtwang
  27. >
  28. >
  29.  
  30. Well you could use a type of bucket sorting algorithm which is faster than
  31. quicksort when sorting integers.  How to make it faster I don't know - you
  32. don't really make algortithms faster you make code implementations of
  33. algorithms faster. Mybe they meant tweaking stratigies for quicksort like how
  34. to choose a pivot element.  Who knows. 
  35.  
  36. -- 
  37.